export function toBetween(num: string | number, min: number, max: number): number {
  const n = Number(num)
  if (n < min) return min
  else if (n > max) return max
  else return n
}
